<template>
	<view>
		<image src="/static/common/bg1.png" class="pagebg1" mode=""></image>
		<u-navbar :safeAreaInsetTop="true" title="选择商品" :autoBack="true" :bgColor="'rgba(255,255,255,'+opc+')'"
			placeholder>
		
		</u-navbar>
		<view class="pagecon">
			<u-search placeholder="请输入商品关键词" :showAction='false' height="81rpx" bgColor="#fff" v-model="keyword" placeholderColor='#979797'></u-search>
			<view class="" style="height: 30rpx;">
				
			</view>
			<view class="" :style="{height:'calc(100vh - 44px - 84rpx - 60rpx - '+$u.addUnit($u.sys().statusBarHeight)+')'}">
				<scroll-view scroll-y="true" style="height: 100%;">
					<view class="item" v-for="(item,index) in list" :key="index" @click="item.ischeck=!item.ischeck">
						<image src="/static/home/pic.png" class="item__pic" mode=""></image>
						<view class="" style="flex: 1;">
							<view class="item__name">
								5重抗氧虾青素
							</view>
							<view class="item__yj">
								佣金5元件
							</view>
							<view class="item__price">
								139.00
							</view>
						</view>
						<u-button v-if="!item.ischeck" :customStyle="{width:'140rpx',height:'60rpx',padding:0,fontSie:'24rpx',margin:'0',}"
							shape='circle' color="#E3432D" text="添加"></u-button>
						<u-button v-else :customStyle="{width:'140rpx',height:'60rpx',padding:0,fontSie:'24rpx',margin:'0',color:'#181818',}"
							shape='circle' color="#F8F8F8" text="取消"></u-button>
					</view>
					<u-gap height="30rpx"></u-gap>
				</scroll-view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				opc:0,
				keyword:'',
				list:[
					{ischeck:false},
					{ischeck:false},
					{ischeck:false},
					{ischeck:false},
					{ischeck:false},
					{ischeck:false},
					{ischeck:false},
					{ischeck:false},
				]
			};
		}
	}
</script>

<style lang="scss">
.pagecon{
	padding: 30rpx 30rpx 0;
	.item{
		padding: 22rpx 23rpx 26rpx 25rpx;
		display: flex;
		align-items: center;
		background-color: #fff;
		margin-bottom: 23rpx;
		&__pic{
			width: 139rpx;
			height: 140rpx;
			border-radius: 15rpx 15rpx 15rpx 15rpx;
			margin-right: 30rpx;
		}
		&__name{
			font-family: PingFang-SC, PingFang-SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #181818;
			line-height: 32rpx;
		}
		&__yj{
			margin-top: 10rpx;
			font-family: PingFang-SC, PingFang-SC;
			font-weight: 500;
			font-size: 21rpx;
			color: #FE8829;
			line-height: 21rpx;
		}
		&__price{
			font-family: DINNextLTPro;
			font-size: 36rpx;
			color: #F54D42;
			line-height: 36rpx;
			margin-top: 20rpx;
			&::before{
				content: "￥";
				font-family: PingFang-SC, PingFang-SC;
				font-weight: bold;
				font-size: 30rpx;
				color: #F54D42;
			}
		}
	}
}
</style>
